import type { R, TableDataInfo } from '@/api/model/resultModel';
import type { XhljWonderfulImageForm, XhljWonderfulImageQuery, XhljWonderfulImageVo } from '@/api/xhlj/model/wonderfulImageModel';
import { request } from '@/utils/request';

// 查询精彩图片列表
export function listWonderfulImage(query?: XhljWonderfulImageQuery) {
  return request.get<TableDataInfo<XhljWonderfulImageVo>>({
    url: '/xhlj/wonderfulImage/list',
    params: query,
  });
}

// 查询精彩图片详细
export function getWonderfulImage(wonderfulImageId: number) {
  return request.get<R<XhljWonderfulImageVo>>({
    url: `/xhlj/wonderfulImage/${wonderfulImageId}`,
  });
}

// 新增精彩图片
export function addWonderfulImage(data: XhljWonderfulImageForm) {
  return request.post<R<void>>({
    url: '/xhlj/wonderfulImage',
    data,
  });
}

// 修改精彩图片
export function updateWonderfulImage(data: XhljWonderfulImageForm) {
  return request.put<R<void>>({
    url: '/xhlj/wonderfulImage',
    data,
  });
}

// 删除精彩图片
export function delWonderfulImage(wonderfulImageIds: number | Array<number>) {
  return request.delete<R<void>>({
    url: `/xhlj/wonderfulImage/${wonderfulImageIds}`,
  });
}
